<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>淘宝主图的尺寸测试</title>
</head>
<body>
	<input id='input' type="text" placeholder="图片链接，不带后缀">
	<input type="button" onclick='show()' value="点我">
	<p>理论上的尺寸：30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,290,300,310,320,350,360,400,430,440,460,480,490,500,540,560,570,580,600,640,670,720,760,800</p>
	<div id="container"></div>
	<script>
	function show(){
		var imgurl = 'https://gd2.alicdn.com/bao/uploaded/i2/TB1Fc3nKVXXXXauXFXXXXXXXXXX_!!0-item_pic.jpg';
		var url = document.getElementById('input').value;
		if(url){
			imgurl = url;
		}

		var arr_str = '30,40,50,60,70,80,90,100,110,120,130,140,150,160,170,180,190,200,210,220,230,240,250,260,270,290,300,310,320,350,360,400,430,440,460,480,490,500,540,560,570,580,600,640,670,720,760,800';
		var arr = arr_str.split(',');
		var html = '';
		for (var i = 0; i < arr.length; i++) {
			html += '<p>' + arr[i] + 'x' + arr[i] + '</p>';
			html += '<img src="' + imgurl + '_' + arr[i] + 'x' + arr[i] + '.jpg"/>';  
		}
		document.getElementById('container').innerHTML = html;
	}
	show();
	</script>
</body>
</html>